package com.cn.service.server.admin.Impl;


import com.cn.mapper.dao.db1.admin.AdminMenuDao;
import com.cn.service.server.admin.AdminMenuServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.cn.bean.pojo.bc.Menu;
import java.util.List;
@Service
public class AdminMenuServerImpl implements AdminMenuServer {
    private AdminMenuDao adminMenuDao;

    @Autowired(required=false)
    public AdminMenuServerImpl(AdminMenuDao adminMenuDao) {
        this.adminMenuDao = adminMenuDao;
    }

    @Override
    public List<Menu> selectMenu() {
        return adminMenuDao.selectMenu();
    }

    @Override
    public List<Menu> selectMenuRoleId(int roleId) {
        return adminMenuDao.selectMenuRoleId(roleId);
    }

    @Override
    public List<Menu> selectAdminMenu(String menuId, String title, int limit, int page) {
        return adminMenuDao.selectAdminMenu(menuId,title,limit,page);
    }

    @Override
    public int getAutoId() {
        return adminMenuDao.getAutoId();
    }

    @Override
    public int insertAdminMenu(int menuId, int level, int parentId, String menuName, String remark, String index, String title) {
        return adminMenuDao.insertAdminMenu(menuId,level,parentId,menuName,remark,index,title);
    }

    @Override
    public int updateAdminMenu(int menuId, int level, int parentId, String menuName, String remark, String index, String title) {
        return adminMenuDao.updateAdminMenu(menuId,level,parentId,menuName,remark,index,title);
    }

    @Override
    public int deleteAdminMenu(int menuId) {
        return adminMenuDao.deleteAdminMenu(menuId);
    }

}
